// jiege_browserView.cpp : implementation of the Cjiege_browserView class
//

#include "stdafx.h"
#include "jiege_browser.h"

#include "jiege_browserDoc.h"
#include "jiege_browserView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// Cjiege_browserView

IMPLEMENT_DYNCREATE(Cjiege_browserView, CFormView)

BEGIN_MESSAGE_MAP(Cjiege_browserView, CFormView)
	ON_BN_CLICKED(IDC_BUTTON_GO, &Cjiege_browserView::OnBnClickedButtonGo)
	ON_BN_CLICKED(IDC_BUTTON_BACK, &Cjiege_browserView::OnBnClickedButtonBack)
	ON_BN_CLICKED(IDC_BUTTON_FORWARD, &Cjiege_browserView::OnBnClickedButtonForward)
	ON_BN_CLICKED(IDC_BUTTON_REFRESH, &Cjiege_browserView::OnBnClickedButtonRefresh)
END_MESSAGE_MAP()

// Cjiege_browserView construction/destruction

Cjiege_browserView::Cjiege_browserView()
	: CFormView(Cjiege_browserView::IDD)
	, m_strAddress(_T(""))
{
	// TODO: add construction code here

}

Cjiege_browserView::~Cjiege_browserView()
{
}

void Cjiege_browserView::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_EXPLORER1, m_IECtrl);
	DDX_Text(pDX, IDC_EDIT_ADDRESS, m_strAddress);
}

BOOL Cjiege_browserView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CFormView::PreCreateWindow(cs);
}

void Cjiege_browserView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	GetParentFrame()->RecalcLayout();
	ResizeParentToFit();

}


// Cjiege_browserView diagnostics

#ifdef _DEBUG
void Cjiege_browserView::AssertValid() const
{
	CFormView::AssertValid();
}

void Cjiege_browserView::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}

Cjiege_browserDoc* Cjiege_browserView::GetDocument() const // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(Cjiege_browserDoc)));
	return (Cjiege_browserDoc*)m_pDocument;
}
#endif //_DEBUG


// Cjiege_browserView message handlers

void Cjiege_browserView::OnBnClickedButtonGo()
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);
	m_IECtrl.Navigate(m_strAddress,NULL,NULL,NULL,NULL);
}

void Cjiege_browserView::OnBnClickedButtonBack()
{
	// TODO: Add your control notification handler code here
}

void Cjiege_browserView::OnBnClickedButtonForward()
{
	// TODO: Add your control notification handler code here
}

void Cjiege_browserView::OnBnClickedButtonRefresh()
{
	// TODO: Add your control notification handler code here
}
